package com.gome.ocean.dao.model.reqres;

/**
 * Created by liuqingxia on 2016/6/2.<br>
 * 请求返回响应
 */
public class AccessResponse {

    private boolean isPermit;
    private String  message;
    private boolean hadLogin;

    public AccessResponse(){
    }

    public AccessResponse notLogin() {
        this.isPermit = false;
        this.hadLogin = false;
        return this;
    }

    public AccessResponse setErrorMsg(String message) {
        this.isPermit = false;
        this.hadLogin = true;
        this.message = message;
        return this;
    }

    public AccessResponse permitTrue() {
        this.isPermit = true;
        return this;
    }

    public boolean isHadLogin() {
        return hadLogin;
    }

    public void setHadLogin(boolean hadLogin) {
        this.hadLogin = hadLogin;
    }

    public boolean isPermit() {
        return isPermit;
    }

    public void setPermit(boolean isPermit) {
        this.isPermit = isPermit;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
